<%--
  Created by IntelliJ IDEA.
  User: Roy
  Date: 2023/11/19
  Time: 15:15
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" isELIgnored="false" contentType="text/html;charset=UTF-8"%>
<html>
<head>
    <title>吐槽吧</title>
</head>
<body>
<h1>吐槽者列表</h1>
<c:url var="prevUrl" value="/spitter/spitterList">
    <c:param name="currentPage" value="${currentPage - 1}" />
</c:url>

<c:url var="nextUrl" value="/spitter/spitterList">
    <c:param name="currentPage" value="${currentPage + 1}" />
</c:url>
<hr>
<table border="1">
    <tr>
        <td>id</td>
        <td>username</td>
        <td>password</td>
        <td>firstName</td>
        <td>LastName</td>
        <td>email</td>
    </tr>
    <c:forEach items="${spitterList}" var="spitter">
        <tr>
            <td>${spitter.id}</td>
            <td>${spitter.userName}</td>
            <td>${spitter.password}</td>
            <td>${spitter.firstName}</td>
            <td>${spitter.lastName}</td>
            <td>${spitter.email}</td>
        </tr>
    </c:forEach>
</table>
<hr>
<c:if test="${!noLess}">
    <a href="${prevUrl}">上一页</a>
</c:if>
<c:if test="${!noMore}">
    <a href="${nextUrl}">下一页</a>
</c:if>
<hr>
<a href="<c:url value="/mHome"/>">返回</a>
</body>
</html>
